Interface ITreeNode<T>

Assembly: redb.Core.dll

Interface for tree nodes with navigational properties and traversal operations

public interface ITreeNode<T> where T : class, ITreeNode<T>

Properties

Ancestors

Gets all node ancestors (from parent to root)

IEnumerable<T> Ancestors { get; }

Children

Collection of child nodes (filled when loading tree)

ICollection<T> Children { get; set; }

Descendants

Gets all node descendants recursively

IEnumerable<T> Descendants { get; }

Id

Unique node identifier

long Id { get; set; }

IsLeaf

Checks if node is leaf (has no children)

bool IsLeaf { get; }

IsRoot

Checks if node is root (has no parent)

bool IsRoot { get; }

Level

Gets node level in tree (0 for root)

int Level { get; }

Parent

Reference to parent node (filled when loading tree)

T? Parent { get; set; }

ParentId

Parent node identifier (null for root nodes)

long? ParentId { get; set; }